<?php
/**
 * Created by PhpStorm.
 * User: idcu
 * Date: 2016/3/15
 * Time: 10:25
 */
namespace OldCrm\Model;
use IDCU\Model\RelationModel;

class OrdersCustomerModel extends RelationModel
{
    protected $connection = array(
        'db_type'       =>  'mysql',
        'db_host'       =>  '114.55.30.131',
        'db_port'       =>  '3306',
        'db_name'       =>  'sxqtwy_crm',
        'db_user'       =>  'zhkj_crm',
        'db_pwd'        =>  'AdkdCGP7fHcjht5c',
        'db_charset'    =>  'utf8',
        'db_debug'      =>  true,
    );
    protected $tablePrefix = '';
    protected $tableName = 'orders_customer';
    protected $_link = array(
        'OrdersPhone' => array(
            'mapping_type' => self::HAS_ONE,
            'mapping_name' => 'phone',
            'foreign_key'   => 'owner_id',
            'as_fields'     => 'number'
        ),
    );
}